// DFS Algorithms#include<stdio.h>int was[1001];int array[1001][1001];int city,ways,i,start,finish;int goal,a,b,counter = 1;int DFS (int x);int main () {        scanf("%d %d", &city, &ways);    scanf("%d %d", &start, &finish);        for (i=0; i<ways ; i++) {        scanf("%d %d", &a,&b);        array[a][b]=1;    }        DFS(start);    if (goal == 1)        printf("Reached");    else        printf("NOPE");}int DFS (int x) {    was[x] = 1;        if (x == finish)        goal = 1;        for (int i=1; i<=city ; i++)        if (array[x][i]==1 && was[i]==0)            DFS(i);    }